namespace AnimationPage.ViewModels;

public partial class ChatListItemViewModel : ViewModelBase
{

    /// <summary>
    /// The display name of this chat list
    /// </summary>
    public string? Name { get; set; }

    /// <summary>
    /// The latest message from this chat
    /// </summary>
    public string? Message { get; set; }

    /// <summary>
    /// The initials to show for the profile picture background
    /// </summary>
    public string? Initials { get; set; }

    /// <summary>
    /// The RGB values (in hex) for the background color of the profile picture
    /// For example FF00FF for Red and Blue mixed
    /// </summary>
    public string? ProfilePictureRGB { get; set; }

    /// <summary>
    /// True if there are unread messages in this chat 
    /// </summary>
    public bool NewContentAvailable { get; set; }

    /// <summary>
    /// True if this item is currently selected
    /// </summary>
    public bool IsSelected { get; set; }

    public void OpenMessage()
    {
        // if (Name == "Jesse")
        // {
        //     ViewModelApplication.GoToPage(ApplicationPage.Login, new LoginViewModel
        //     {
        //         Email = "jesse@helloworld.com"
        //     });
        //     return;
        // }
        //
        // ViewModelApplication.GoToPage(ApplicationPage.Chat, new ChatMessageListViewModel
        // {
        //     DisplayTitle = "Parnell, Me",
        //
        //     Items = new ObservableCollection<ChatMessageListItemViewModel>
        //     {
        //         new ChatMessageListItemViewModel
        //         {
        //             Message = Message,
        //             Initials = Initials,
        //             MessageSentTime = DateTime.UtcNow,
        //             ProfilePictureRGB = "FF00FF",
        //             SenderName = "Luke",
        //             SentByMe = true,
        //         },
        //         new ChatMessageListItemViewModel
        //         {
        //             Message = "A received message",
        //             Initials = Initials,
        //             MessageSentTime = DateTime.UtcNow,
        //             ProfilePictureRGB = "FF0000",
        //             SenderName = "Parnell",
        //             SentByMe = false,
        //         },
        //         new ChatMessageListItemViewModel
        //         {
        //             Message = "A received message",
        //             Initials = Initials,
        //             MessageSentTime = DateTime.UtcNow,
        //             ProfilePictureRGB = "FF0000",
        //             SenderName = "Parnell",
        //             SentByMe = false,
        //         },
        //         new ChatMessageListItemViewModel
        //         {
        //             Message = Message,
        //             Initials = Initials,
        //             MessageSentTime = DateTime.UtcNow,
        //             ProfilePictureRGB = "FF00FF",
        //             SenderName = "Luke",
        //             SentByMe = true,
        //         },
        //         new ChatMessageListItemViewModel
        //         {
        //             Message = "A received message",
        //             Initials = Initials,
        //             MessageSentTime = DateTime.UtcNow,
        //             ProfilePictureRGB = "FF0000",
        //             SenderName = "Parnell",
        //             SentByMe = false,
        //         },
        //         new ChatMessageListItemViewModel
        //         {
        //             Message = "A received message",
        //             ImageAttachment = new ChatMessageListItemImageAttachmentViewModel
        //             {
        //                 ThumbnailUrl = "http://anywhere"
        //             },
        //             Initials = Initials,
        //             MessageSentTime = DateTime.UtcNow,
        //             ProfilePictureRGB = "FF0000",
        //             SenderName = "Parnell",
        //             SentByMe = false,
        //         },
        //     }
        // });
    }
}